/*
 * @LastEditors: 杜康
 * @LastEditTime: 2021-10-07 20:42:22
 */
class Stack {
    constructor () {
        this.items = []
    }
    push (element) {
        this.items.push(element)
    }
    pop () {
        this.items.pop()
    }
    peek () {
        return this.items[this.items.length - 1]
    }
    isEmpty () {
        return this.items.length === 0
    }
    size () {
        return this.items.length
    }
    clear () {
        this.items = []
    }
}